Skip to content

Feature: Add API_KEY option for CLI #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TheBlackHacker
Copy link

@TheBlackHacker TheBlackHacker commented May 5, 2025

This pull request introduces support for specifying an API key to authenticate requests to the VLLM server. The API key can now be passed as a CLI option (--api-key) to the relevant commands, or in config file. When provided, the API key is added to the HTTP headers in requests made to the server.

Changes:

  1. Added an api_key CLI option to commands such as system-check, create, and curate. Also added into llm_client.py.
  2. Modified the server check logic to include an Authorization header when an API key is provided.
  3. Ensured backward compatibility by falling back to configuration settings if the CLI option is not used.

Motivation and Context:

  • Enhances the security of the Synthetic Data Kit by allowing more flexible authentication mechanisms.
  • Provides a straightforward way to configure API credentials both via CLI and configuration files.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants